package com.gxk.res;

import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.utils.Array;

public class ImageFactory implements IResource {
	private final static Image logoImg = new Image(ATLAS.findRegion("logo"));
	private final static Image titleImg = new Image(ATLAS.findRegion("title"));
	private final static Image tutorialImg = new Image(
			ATLAS.findRegion("tutorial"));
	private final static Image readyImg = new Image(
			ATLAS.findRegion("textready"));
	private final static Image overImg = new Image(ATLAS.findRegion("textover"));
	private final static Image scorePanelImg = new Image(
			ATLAS.findRegion("score"));
	private final static Image newImg = new Image(ATLAS.findRegion("new"));

	private final static AtlasRegion pipeupRegion = ATLAS.findRegion("pipeup");
	private final static AtlasRegion pipedownTeture = ATLAS
			.findRegion("pipedown");

	private final static Image loadingBgImg = new Image(
			ATLAS.findRegion("black"));
	private final static Array<AtlasRegion> bgGroundRegions = ATLAS
			.findRegions("bg");
	private final static Array<AtlasRegion> medals = ATLAS
			.findRegions("medals");

	public static Image getLogoImage() {
		return logoImg;
	}

	public static Image getLoadingBgImage() {
		return loadingBgImg;
	}

	public static Image getMainBgImage() {
		return new Image(bgGroundRegions.random());
	}

	public static Image getTitleImage() {
		return titleImg;
	}

	public static Image getTagTipImage() {
		return tutorialImg;
	}

	public static Image getReadyImage() {
		return readyImg;
	}

	public static AtlasRegion getBarUpImage() {
		return pipeupRegion;
	}

	public static AtlasRegion getBarDownImage() {
		return pipedownTeture;
	}

	public static Image getOverImage() {
		return overImg;
	}

	public static Image getScorePanelImage() {
		return scorePanelImg;
	}

	public static Image getNewImage() {
		return newImg;
	}

	public static Image getMedalImage(int index) {
		return new Image(medals.get(index));
	}
}
